package com.king.framework.base.domain.vo;

import java.util.List;

import com.github.pagehelper.PageInfo;

public class PageResult<T> {
	
	/** 当前记录起始索引 */
	private Integer pageNum;

	/** 每页显示记录数 */
	private Integer pageSize;

	/** 总记录数 */
	private long total;

	/** 列表数据 */
	private List<?> rows;
	
	

	public PageResult() {
		super();
	}
	
	public PageResult(List<T> rows){
		super();
		this.total = new PageInfo<T>(rows).getTotal();
		this.rows = rows;
	}

	public PageResult(long total, List<?> rows) {
		super();
		this.total = total;
		this.rows = rows;
	}

	public PageResult(Integer pageNum, Integer pageSize, long total, List<?> rows) {
		super();
		this.pageNum = pageNum;
		this.pageSize = pageSize;
		this.total = total;
		this.rows = rows;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public List<?> getRows() {
		return rows;
	}

	public void setRows(List<?> rows) {
		this.rows = rows;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	
	
}
